package exp;

public class multi {
		   
	   static void check(int i,int j) throws age,invalidage// NullPointerException,NegativeArraySizeException
	    {	
		   
	    
	    	if(j<=0){
	    		System.out.println("divided by zoer");
	    //		throw new age("divide by zero error");
	    		
	    	}
	    	if(i>18 && j<30)
			{
	    		System.out.println("not valid");
				//throw new invalidage("not valid");
			
			}
	    }
	    
	    	public static void main(String[] args) throws invalidage, age{
	        	{
	        		try{
	        		    multi.check(9,0);
	        		} 
	        		    catch (age e) {
	        		   
	        		    	throw e; //System.out.println(e.printStackTrace());
	        		   // e.printStackTrace();
	        		    } 
	        		//throw age;
	        	  //  catch (invalidage e1) {
	        	//    e1.printStackTrace();
	        	    	//throw e1;
	        		//   }
	        		
	        	}
	    }
	    
}
	



